package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TmcUserParkingMapper;
import com.ruoyi.system.domain.TmcUserParking;
import com.ruoyi.system.service.ITmcUserParkingService;

/**
 * 车位管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-06-28
 */
@Service
public class TmcUserParkingServiceImpl implements ITmcUserParkingService 
{
    @Autowired
    private TmcUserParkingMapper tmcUserParkingMapper;

    /**
     * 查询车位管理
     * 
     * @param id 车位管理ID
     * @return 车位管理
     */
    @Override
    public TmcUserParking selectTmcUserParkingById(Long id)
    {
        return tmcUserParkingMapper.selectTmcUserParkingById(id);
    }

    /**
     * 查询车位管理列表
     * 
     * @param tmcUserParking 车位管理
     * @return 车位管理
     */
    @Override
    public List<TmcUserParking> selectTmcUserParkingList(TmcUserParking tmcUserParking)
    {
        return tmcUserParkingMapper.selectTmcUserParkingList(tmcUserParking);
    }

    /**
     * 新增车位管理
     * 
     * @param tmcUserParking 车位管理
     * @return 结果
     */
    @Override
    public int insertTmcUserParking(TmcUserParking tmcUserParking)
    {
        tmcUserParking.setCreateTime(DateUtils.getNowDate());
        return tmcUserParkingMapper.insertTmcUserParking(tmcUserParking);
    }

    /**
     * 修改车位管理
     * 
     * @param tmcUserParking 车位管理
     * @return 结果
     */
    @Override
    public int updateTmcUserParking(TmcUserParking tmcUserParking)
    {
        tmcUserParking.setUpdateTime(DateUtils.getNowDate());
        return tmcUserParkingMapper.updateTmcUserParking(tmcUserParking);
    }

    /**
     * 批量删除车位管理
     * 
     * @param ids 需要删除的车位管理ID
     * @return 结果
     */
    @Override
    public int deleteTmcUserParkingByIds(Long[] ids)
    {
        return tmcUserParkingMapper.deleteTmcUserParkingByIds(ids);
    }

    /**
     * 删除车位管理信息
     * 
     * @param id 车位管理ID
     * @return 结果
     */
    @Override
    public int deleteTmcUserParkingById(Long id)
    {
        return tmcUserParkingMapper.deleteTmcUserParkingById(id);
    }
}
